home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 April: Mac OS SDK / Dev.CD Apr 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / PInterfaces / EPPC.p < prev    next >
Encoding:
Text File  |  1998-02-12  |  4.2 KB  |  157 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        EPPC.p
  3.  
  4.      Contains:    High Level Event Manager Interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Release:    Universal Interfaces 3.1
  8.  
  9.      Copyright:    © 1988-1998 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. }
  18. {$IFC UNDEFINED UsingIncludes}
  19. {$SETC UsingIncludes := 0}
  20. {$ENDC}
  21.  
  22. {$IFC NOT UsingIncludes}
  23.  UNIT EPPC;
  24.  INTERFACE
  25. {$ENDC}
  26.  
  27. {$IFC UNDEFINED __EPPC__}
  28. {$SETC __EPPC__ := 1}
  29.  
  30. {$I+}
  31. {$SETC EPPCIncludes := UsingIncludes}
  32. {$SETC UsingIncludes := 1}
  33.  
  34. {$IFC UNDEFINED __ERRORS__}
  35. {$I Errors.p}
  36. {$ENDC}
  37. {$IFC UNDEFINED __APPLETALK__}
  38. {$I AppleTalk.p}
  39. {$ENDC}
  40. {$IFC UNDEFINED __FILES__}
  41. {$I Files.p}
  42. {$ENDC}
  43. {$IFC UNDEFINED __PPCTOOLBOX__}
  44. {$I PPCToolbox.p}
  45. {$ENDC}
  46. {$IFC UNDEFINED __PROCESSES__}
  47. {$I Processes.p}
  48. {$ENDC}
  49. {$IFC UNDEFINED __EVENTS__}
  50. {$I Events.p}
  51. {$ENDC}
  52.  
  53.  
  54. {$PUSH}
  55. {$ALIGN MAC68K}
  56. {$LibExport+}
  57.  
  58.  
  59. CONST
  60.                                                                 {  postOptions currently supported  }
  61.     receiverIDMask                = $0000F000;
  62.     receiverIDisPSN                = $00008000;
  63.     receiverIDisSignature        = $00007000;
  64.     receiverIDisSessionID        = $00006000;
  65.     receiverIDisTargetID        = $00005000;
  66.     systemOptionsMask            = $00000F00;
  67.     nReturnReceipt                = $00000200;
  68.     priorityMask                = $000000FF;
  69.     nAttnMsg                    = $00000001;
  70.  
  71.                                                                 {  constant for return receipts  }
  72.     HighLevelEventMsgClass        = 'jaym';
  73.     rtrnReceiptMsgID            = 'rtrn';
  74.  
  75.     msgWasPartiallyAccepted        = 2;
  76.     msgWasFullyAccepted            = 1;
  77.     msgWasNotAccepted            = 0;
  78.  
  79.  
  80. TYPE
  81.     TargetIDPtr = ^TargetID;
  82.     TargetID = RECORD
  83.         sessionID:                LONGINT;
  84.         name:                    PPCPortRec;
  85.         location:                LocationNameRec;
  86.         recvrName:                PPCPortRec;
  87.     END;
  88.  
  89.     TargetIDHandle                        = ^TargetIDPtr;
  90.     TargetIDHdl                            = TargetIDHandle;
  91.     SenderID                            = TargetID;
  92.     SenderIDPtr                         = ^SenderID;
  93.     HighLevelEventMsgPtr = ^HighLevelEventMsg;
  94.     HighLevelEventMsg = RECORD
  95.         HighLevelEventMsgHeaderLength: UInt16;
  96.         version:                UInt16;
  97.         reserved1:                UInt32;
  98.         theMsgEvent:            EventRecord;
  99.         userRefcon:                UInt32;
  100.         postingOptions:            UInt32;
  101.         msgLength:                UInt32;
  102.     END;
  103.  
  104.     HighLevelEventMsgHandle                = ^HighLevelEventMsgPtr;
  105.     HighLevelEventMsgHdl                = HighLevelEventMsgHandle;
  106. {$IFC TYPED_FUNCTION_POINTERS}
  107.     GetSpecificFilterProcPtr = FUNCTION(contextPtr: UNIV Ptr; msgBuff: HighLevelEventMsgPtr; {CONST}VAR sender: TargetID): BOOLEAN;
  108. {$ELSEC}
  109.     GetSpecificFilterProcPtr = ProcPtr;
  110. {$ENDC}
  111.  
  112.     GetSpecificFilterUPP = UniversalProcPtr;
  113.  
  114. CONST
  115.     uppGetSpecificFilterProcInfo = $00000FD0;
  116.  
  117. FUNCTION NewGetSpecificFilterProc(userRoutine: GetSpecificFilterProcPtr): GetSpecificFilterUPP;
  118.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  119.     INLINE $2E9F;
  120.     {$ENDC}
  121.  
  122. FUNCTION CallGetSpecificFilterProc(contextPtr: UNIV Ptr; msgBuff: HighLevelEventMsgPtr; {CONST}VAR sender: TargetID; userRoutine: GetSpecificFilterUPP): BOOLEAN;
  123.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  124.     INLINE $205F, $4E90;
  125.     {$ENDC}
  126. FUNCTION PostHighLevelEvent({CONST}VAR theEvent: EventRecord; receiverID: UNIV Ptr; msgRefcon: UInt32; msgBuff: UNIV Ptr; msgLen: UInt32; postingOptions: UInt32): OSErr;
  127.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  128.     INLINE $3F3C, $0034, $A88F;
  129.     {$ENDC}
  130. FUNCTION AcceptHighLevelEvent(VAR sender: TargetID; VAR msgRefcon: UInt32; msgBuff: UNIV Ptr; VAR msgLen: UInt32): OSErr;
  131.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  132.     INLINE $3F3C, $0033, $A88F;
  133.     {$ENDC}
  134. FUNCTION GetProcessSerialNumberFromPortName({CONST}VAR portName: PPCPortRec; VAR pPSN: ProcessSerialNumber): OSErr;
  135.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  136.     INLINE $3F3C, $0035, $A88F;
  137.     {$ENDC}
  138. FUNCTION GetPortNameFromProcessSerialNumber(VAR portName: PPCPortRec; {CONST}VAR pPSN: ProcessSerialNumber): OSErr;
  139.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  140.     INLINE $3F3C, $0046, $A88F;
  141.     {$ENDC}
  142. FUNCTION GetSpecificHighLevelEvent(aFilter: GetSpecificFilterUPP; contextPtr: UNIV Ptr; VAR err: OSErr): BOOLEAN;
  143.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  144.     INLINE $3F3C, $0045, $A88F;
  145.     {$ENDC}
  146.  
  147. {$ALIGN RESET}
  148. {$POP}
  149.  
  150. {$SETC UsingIncludes := EPPCIncludes}
  151.  
  152. {$ENDC} {__EPPC__}
  153.  
  154. {$IFC NOT UsingIncludes}
  155.  END.
  156. {$ENDC}
  157.